This project is a reference implementation for Pxxxx: Bit Permutations (new proposal, not yet published).
This project provides a single-header reference implementation of the functions
bit_reversebit_repeatnext_bit_permutationprev_bit_permutationbit_compressrbit_expandrbit_compresslbit_expandl
There are also implementations of existing <bit> functions for the purpose of testing.
The standard library functions don't support _BitInt or 128-bit integers, so it was necessary
to circumvent them:
popcountcountl_zerocountl_onecountr_zerocountr_one
All functions are located in namespace cxx26bp.
This implementation aims to provide the fastest possible library implementation for each of these functions, using any possible hardware support. This project is portable, and tries to support
- Architectures: x86, ARM
- Compilers: MSVC, GCC, Clang